Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include additional fields for submission table, UI updates #54

Merged
merged 4 commits into from
Apr 5, 2024

Conversation

wilwong89
Copy link
Contributor

Description

Add the following fields to the submission table: contactPreference, contactApplicantRelationship, projectDescription, isRentalUnit.
Functionality for updating those fields.
Updated labels for certain submission types.

SHOWCASE-3600

Types of changes

New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING doc
  • I have checked that unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

Copy link

github-actions bot commented Apr 3, 2024

Coverage Report (Application)

Totals Coverage
Statements: 47.39% ( 481 / 1015 )
Methods: 37.44% ( 76 / 203 )
Lines: 61.86% ( 339 / 548 )
Branches: 25% ( 66 / 264 )

Copy link

codeclimate bot commented Apr 3, 2024

Code Climate has analyzed commit b2f4abe and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 36.7% (0.9% change).

View more on Code Climate.

Copy link

github-actions bot commented Apr 3, 2024

Coverage Report (Frontend)

Totals Coverage
Statements: 22.03% ( 431 / 1956 )
Methods: 23.3% ( 82 / 352 )
Lines: 24.13% ( 264 / 1094 )
Branches: 16.67% ( 85 / 510 )

queuePriority: parseInt(data.queuePriority),
singleFamilyUnits: maxUnits,
isRentalUnit: camelCaseToTitleCase(deDupeUnsure(data.isRentalUnit)),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'Unsure' is a pointless value.
maybe the CHEFS data should be converted true|false|null in the database. The postgres boolean type .. and prisma and joi.. support that.. (eg for knex table.boolean('isRentalUnit')
The isTruthy utils function might handle the deduping as well.

kyle1morel
kyle1morel previously approved these changes Apr 3, 2024
app/src/validators/submission.ts Outdated Show resolved Hide resolved
app/src/types/Submission.ts Outdated Show resolved Hide resolved
frontend/src/types/Submission.ts Show resolved Hide resolved
@kyle1morel kyle1morel dismissed their stale review April 3, 2024 20:37

Accidental approval

@wilwong89 wilwong89 marked this pull request as ready for review April 3, 2024 23:59
*/
export function camelCaseToTitleCase(input: string | null): string | null {
if (!input) return input;

Copy link

@jatindersingh93 jatindersingh93 Apr 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be get rid of extra line

@kyle1morel kyle1morel force-pushed the feature/submission-update branch from f7bcf1b to b2f4abe Compare April 5, 2024 20:21
@kyle1morel kyle1morel closed this Apr 5, 2024
@kyle1morel kyle1morel reopened this Apr 5, 2024
@kyle1morel kyle1morel merged commit 675c299 into master Apr 5, 2024
33 checks passed
@kyle1morel kyle1morel deleted the feature/submission-update branch April 5, 2024 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants